package sjms.behavior.command;

/**
 * @ClassName:
 * @Description:
 * @Author fcb
 * @Date 2020/6/6 16:36
 */
public class Test {

    public static void main(String[] args) {
        Light light = new Light();

        Command on = new OnCommand(light);
        Command off = new OffCommand(light);

        CommandInvoke invoke = new CommandInvoke();
        invoke.setCommand(on);
        invoke.setCommand(off);

        invoke.execute();
    }

}
